this._messageQueueTimeoutId = 0;
this._failCounter = 0;
+ this._activeServices = new Set();
this._unavailableServices = new Set();
this._credentialManagers = {};
this._clearUserVerifier();
this._clearMessageQueue();
+ this._activeServices.clear();
}
destroy() {
'problem', this._onProblem.bind(this),
'info-query', this._onInfoQuery.bind(this),
'secret-info-query', this._onSecretInfoQuery.bind(this),
+ 'conversation-started', this._onConversationStarted.bind(this),
'conversation-stopped', this._onConversationStopped.bind(this),
'service-unavailable', this._onServiceUnavailable.bind(this),
'reset', this._onReset.bind(this),
async _startService(serviceName) {
this._hold.acquire();
try {
+ this._activeServices.add(serviceName);
if (this._userName) {
await this._userVerifier.call_begin_verification_for_user(
serviceName, this._userName, this._cancellable);
serviceName, this._cancellable);
}
} catch (e) {
+ this._activeServices.delete(serviceName);
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
if (!this.serviceIsForeground(serviceName)) {
_onReset() {
// Clear previous attempts to authenticate
this._failCounter = 0;
+ this._activeServices.clear();
this._unavailableServices.clear();
this._updateDefaultService();
this._queueMessage(serviceName, errorMessage, MessageType.ERROR);
}
+ _onConversationStarted(client, serviceName) {
+ this._activeServices.add(serviceName);
+ }
+
_onConversationStopped(client, serviceName) {
+ this._activeServices.delete(serviceName);
+
// If the login failed with the preauthenticated oVirt credentials
// then discard the credentials and revert to default authentication
// mechanism.